<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="<%=basePath%>static/lib/html5.js"></script>
<script type="text/javascript" src="<%=basePath%>static/lib/respond.min.js"></script>
<script type="text/javascript" src="<%=basePath%>static/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]--><title>用户消息</title>
</head>
<body>
<div class="cl pd-20" style=" background-color:#5bacb6">
  <dl style="margin-left:50px; color:#fff">
    <dt><span class="f-18">最新消息：</dt>
  </dl>
</div>
<c:forEach items="${unReadMessages}" var="message">
<div class="pd-20">
	  <table class="table" style=" background-color:#A4D3EE">
	    <tbody>
	      <tr>
	        <th class="text-r"  width="80">发送时间：</th>
	        <td>${message.sendTime}</td>
	      </tr>
	      <tr>
	        <th class="text-r">发送人：</th>
	        <td>${message.TMessage.sender}</td>
	      </tr>
	      <tr>
	        <th class="text-r">消息类型：</th>
	        <td>
	        	<c:if test="${message.TMessage.messageType==1}">用户消息</c:if>
	        	<c:if test="${message.TMessage.messageType==2}">系统消息</c:if>
	        	<c:if test="${message.TMessage.messageType==3}">告警消息</c:if>
	        </td>
	      </tr>
	      <tr>
	        <th class="text-r">阅读状态：</th>
	        <td>
	        	<c:if test="${message.readFlag==0}">未阅读</c:if>
	        	<c:if test="${message.readFlag==1}">已阅读</c:if>
	        </td>
	      </tr>
	      <tr>
	        <th class="text-r">内容：</th>
	        <td>${message.TMessage.content}</td>
	      </tr>
	    </tbody>
	  </table>
</div>
</c:forEach>

  <div class="cl pd-20" style=" background-color:#D4D4D4">
  <dl style="margin-left:50px; ">
    <dt><span class="f-18">历史消息：</span></dt>
  </dl>
</div>

<c:forEach items="${readedMessages}" var="message">
<div class="pd-20">
	  <table class="table" style=" background-color:#EDEDED">
	    <tbody>
	      <tr>
	        <th class="text-r"  width="80">发送时间：</th>
	        <td>${message.sendTime}</td>
	      </tr>
	      <tr>
	        <th class="text-r">发送人：</th>
	        <td>${message.TMessage.sender}</td>
	      </tr>
	      <tr>
	        <th class="text-r">消息类型：</th>
	        <td>
	        	<c:if test="${message.TMessage.messageType==1}">用户消息</c:if>
	        	<c:if test="${message.TMessage.messageType==2}">系统消息</c:if>
	        	<c:if test="${message.TMessage.messageType==3}">告警消息</c:if>
	        </td>
	      </tr>
	      <tr>
	        <th class="text-r">阅读状态：</th>
	        <td>
	        	<c:if test="${message.readFlag==0}">未阅读</c:if>
	        	<c:if test="${message.readFlag==1}">已阅读</c:if>
	        </td>
	      </tr>
	      <tr>
	        <th class="text-r">内容：</th>
	        <td>${message.TMessage.content}</td>
	      </tr>
	    </tbody>
	  </table>
</div>
</c:forEach>

<script type="text/javascript" src="<%=basePath%>static/js/jquery.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="<%=basePath%>static/static/h-ui.admin/js/H-ui.admin.js"></script>
</body>
</html>
